//
//  SKColorUtils.h
//  Sudoku
//
//  Created by Richard Hodgkins on 13/09/2012.
//  Copyright (c) 2012 Richard Hodgkins. All rights reserved.
//

#define UIColorFromARGBValues(alphaValue, redValue, greenValue, blueValue) [UIColor \
colorWithRed:(redValue) \
green:(greenValue) \
blue:(blueValue) \
alpha:(alphaValue)]

#define UIColorFromRGBValues(redValue, greenValue, blueValue) (UIColorFromARGBValues(1.0, (redValue), (greenValue), (blueValue)))

#define UIColorFromARGB(argbValue) (UIColorFromARGBValues( \
((float)(((argbValue) & 0xFF000000) >> 24))/255.0, \
((float)(((argbValue) & 0x00FF0000) >> 16))/255.0, \
((float)(((argbValue) & 0x0000FF00) >>  8))/255.0, \
((float)(((argbValue) & 0x000000FF) >>  0))/255.0))

#define UIColorFromRGB(rgbValue) (UIColorFromARGB(0xFF000000 | (rgbValue)))

#define UIColorFromGrayscale(alphaValue, whiteValue) [UIColor colorWithWhite:(whiteValue) alpha:(alphaValue)]
